-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ability for custom storyshots testFunctions to utilise "snapshot per story file" #1841
Ability for custom storyshots testFunctions to utilise "snapshot per story file" #1841
Conversation
Codecov Report
@@ Coverage Diff @@
## release/3.3 #1841 +/- ##
===============================================
+ Coverage 22.31% 22.32% +0.01%
===============================================
Files 324 324
Lines 6322 6319 -3
Branches 797 795 -2
===============================================
Hits 1411 1411
+ Misses 4323 4316 -7
- Partials 588 592 +4
Continue to review full report at Codecov.
|
Fantastic first PR @digitalmaster ! I'd like @igor-dv to have a look before merging 👍 |
getSnapshotFileName
function for use in custom test functionsThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool. Can you please add an example to the readme
of how to use it ?
@ndelangen Thanks a lot! Glad others also find this useful :) @igor-dv Added an example.. Let me know if it's unclear or has any bugs. 😬 |
@digitalmaster, thanks, looks great ! |
@digitalmaster, wanna merge ? |
Sure.. on to this 3.3 release right? |
yeah to the 3.3 |
@igor-dv I can't merge this PR myself without having push access to this repo right? Or am I missing something? |
Ah, so let me push it then 😃 |
Awesome thanks. |
Do you guys have any idea when another release will be created? |
Issue:
Can't use
multiSnapshotWithOptions
with custom test function becausegetSnapshotFileName
is not exported.What I did
This is a small tweak to the new
multiSnapshotWithOptions
test function. It basically just exports thegetSnapshotFileName
function so it can be used by those of use who have implemented our own custom test function. I also did a minor refactor and moved thegetSnapshotFileName
function to theutils.js
file. Do let me know if this doesn't make any sense.How to test
Go to
storybook\addons\storyshots
and run
yarn example
Is this testable with jest or storyshots?
Storyshots
Does this need a new example in the kitchen sink apps?
It should not.
Does this need an update to the documentation?
[Updated Docs] Yes.. We could mention this export in the docs so other users could become aware of it.
If your answer is yes to any of these, please make sure to include it in your PR.